Ambiguous virtual channels

ABSTRACT

An apparatus comprises a first plurality of buffers configured to store operations belonging to a first virtual channel and a control circuit coupled to the first plurality of buffers. The first virtual channel includes first operations and second operations, wherein each of the first operations depend on at least one of the second operations during use. A first number of the first operations is less than or equal to a maximum. It is ambiguous, for a first received operation in the first virtual channel, whether the first received operation is one of the first operations or the second operations. A total number of the first plurality of buffers exceeds the maximum.

This application claims benefit of priority to U.S. Provisional PatentApplication Ser. No. 60/380,740, filed May 15, 2002.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention is related to the field of deadlock prevention incommunications between coherent agents in a distributed coherent system.

2. Description of the Related Art

In various systems in which multiple agents may initiate operations,system deadlock is a possibility. Particularly, operations may be partof a complex set of operations required to complete a communicationbetween agents in the system. In such cases, the operations may havevarious dependencies on one another, requiring operations to be able tobypass one another at the communication medium to complete the overallcommunication. If the bypassing is not possible, deadlock may occur.Thus, mechanisms to prevent deadlock are needed.

One mechanism used to prevent deadlock is virtual channels. A virtualchannel may be though of as an abstract connection over a communicationmedium. Each virtual channel used on the communication medium is definedto flow over the communication medium logically independent of the othervirtual channels on that communication medium. For example, buffers oneach side of the communication medium may be defined for the virtualchannels, and separate (independent) flow controls may be used for eachvirtual channel. Thus, if one virtual channel is blocked (e.g. due to alack of receiving buffers on the other end of the communication medium,or for some logical reason such as a protocol requirement ordependency), other virtual channels may still communicate over thecommunication medium. In some cases, a given virtual channel may beimplemented as a separate physical communication medium. In other cases,however, virtual channels may share at least a portion of acommunication medium between a source and a destination.

By assigning operations that may have dependencies on each other toseparate virtual channels, the operations may be permitted to occur inthe correct order since the virtual channels may not block each otherdue to physical or resource constraints. That is, if a first operationis stalled due to a dependency on a second operation, the fact that thesecond operation is in a different virtual channel than the firstoperation ensures that the second operation will not be blocked fromtransmission by the first operation.

In some cases, false dependencies between operations may occur. Forexample, such false dependencies may occur if there is ambiguity as tothe dependency (or lack thereof). If ambiguity may not be resolved atthe time an operation is to be placed in a virtual channel, then a falsedependency may be created to ensure that the coherency mechanism workscorrectly for either resolution of the ambiguity. The dependency isfalse if the dependency is created (to resolve the ambiguity) but inreality the dependency does not exist. False dependencies may lead todeadlock in the system even with the use of virtual channels.

SUMMARY OF THE INVENTION

In one embodiment, an apparatus comprises a first plurality of buffersconfigured to store operations belonging to a first virtual channelduring use and a control circuit coupled to the first plurality ofbuffers. The first virtual channel includes first operations and secondoperations, wherein each of the first operations depend on at least oneof the second operations during use. A first number of the firstoperations is less than or equal to a maximum. The control circuit isconfigured to control allocation and deallocation of the first pluralityof buffers. It is ambiguous, for a first received operation in the firstvirtual channel, whether the first received operation is one of thefirst operations or the second operations. A total number of the firstplurality of buffers exceeds the maximum.

In some implementations, the apparatus further includes a second bufferor buffers configured to store operations belonging to a second virtualchannel during use. In at least some cases, a first operation in thefirst virtual channel is dependent on a third operation in the secondvirtual channel, and the third operation is further dependent on one ofthe second operations, whereby the first operation is dependent on oneof the second operations. In some cases, the dependency may be a falsedependency.

In some implementations, the apparatus may be a processor. In such animplementation, the second buffers may be read buffers and the firstplurality of buffers may be snoop buffers. In some otherimplementations, the apparatus may be a memory bridge. In such animplementation, the second buffers may be coherent read buffers and thefirst plurality of buffers may be acknowledge buffers.

In another embodiment, a cache is contemplated. The cache comprises acache memory; one or more read buffers configured to store readoperations for the cache memory; one or more write buffers configured tostore write operations for the cache memory; and a control circuitcoupled to the write buffers. In response to a hit of a probe on a firstwrite operation in the write buffers, the control circuit is configuredto change a state of the first write operation to invalid.

A method is contemplated. A first virtual channel to which firstoperations belong is merged with a second virtual channel to whichsecond operations belong, creating a merged virtual channel. At leastsome of the first operations have a dependency on one or more of thesecond operations during use. A number of he first operations having thedependency is less than or equal to a maximum. It is ambiguous whether areceived operation is one of the first operations or the secondoperations. A number of buffers are provided for the merged virtualchannel, wherein the number exceeds the maximum.

BRIEF DESCRIPTION OF THE DRAWINGS

The following detailed description makes reference to the accompanyingdrawings, which are now briefly described.

FIG. 1 is a block diagram of one embodiment of a node.

FIG. 2 is a table illustrating an exemplary set of coherency commandsand a table illustrating an exemplary set of transactions according toone embodiment of the node shown in FIG. 1.

FIG. 3 is a block diagram of an address space supported by oneembodiment of the node shown in FIG. 1.

FIG. 4 is a decision tree illustrating operation of one embodiment of anode for a read transaction on the interconnect within the node.

FIG. 5 is a decision tree illustrating operation of one embodiment of anode for a write transaction on the interconnect within the node.

FIG. 6 is a diagram illustrating operation of one embodiment of thememory bridge for remote coherency commands received by the memorybridge.

FIG. 7 is a block diagram illustrating examples of ambiguity betweencertain coherency commands in one embodiment of the node illustrated inFIG. 1.

FIG. 8 is a block diagram of a portion of one embodiment of a processorshown in FIG. 1.

FIG. 9 is a flowchart illustrating operation of one embodiment of acontrol circuit shown in FIG. 8 in response to a snoop.

FIG. 10 is a block diagram of a portion of one embodiment of a memorybridge shown in FIG. 1.

FIG. 11 is a flowchart illustrating operation of one embodiment acontrol circuit shown in FIG. 10.

FIG. 12 is a block diagram of one embodiment of a portion of the L2cache shown in FIG. 1.

FIG. 13 is a flowchart illustrating operation of one embodiment of acontrol circuit shown in FIG. 12 in response to a probe.

FIG. 14 is a block diagram of one embodiment of a computer accessiblemedium.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims.

DETAILED DESCRIPTION OF EMBODIMENTS

Node Overview

Turning now to FIG. 1, a block diagram of one embodiment of a node 10 isshown. In the embodiment of FIG. 1, the node 10 includes one or moreprocessors 12A–12N, a memory controller 14, a switch 18, a set ofinterface circuits 20A–20C, a memory bridge 32, and an L2 cache 36. Thememory bridge 32 includes a remote line directory 34. The node 10includes an interconnect 22 to which the processors 12A–12N, the memorycontroller 14, the L2 cache 36, the memory bridge 32, and the remoteline directory 34 are coupled. The node 10 is coupled, through thememory controller 14, to a memory 24. The interface circuits 20A–20Ceach include a receive (Rx) circuit 26A–26C and a transmit (Tx) circuit28A–28C. The node 10 is coupled to a set of interfaces 30A-30C throughrespective interface circuits 20A–20C. The interface circuits 20A–20Care coupled to the switch 18, which is further coupled to the memorybridge 32. A configuration register 38 is also illustrated in FIG. 1,which stores a node number (Node #) for the node 10. The configurationregister 38 is coupled to the L2 cache 36, the memory controller 14, thememory bridge 32, and the interface circuits 20A–20C in the embodimentof FIG. 1. Additionally, the processors 12A–12N may be coupled toreceive the node number from the configuration register 38.

The node 10 may support intranode coherency for transactions on theinterconnect 22. Additionally, the node 10 may support internodecoherency with other nodes (e.g. a CC-NUMA coherency, in oneembodiment). Generally, as used herein, a memory bridge includescircuitry designed to handle internode coherency functions within anode. Particularly, in one embodiment, if a transaction on theinterconnect 22 (e.g. a transaction issued by the processors 12A–12N)accesses a cache block that is remote to the node 10 (i.e. the cacheblock is part of the memory coupled to a different node) and the node 10does not have sufficient ownership to perform the transaction, thememory bridge 32 may issue one or more coherency commands to the othernodes to obtain the ownership (and a copy of the cache block, in somecases). Similarly, if the transaction access a local cache block but oneor more other nodes have a copy of the cache block, the memory bridge 32may issue coherency commands to other nodes. Still further, the memorybridge 32 may receive coherency commands from other nodes, and mayperform transactions on the interconnect 22 to effect the coherencycommands.

In one embodiment, a node such as node 10 may have memory coupledthereto (e.g. memory 24). The node may be responsible for tracking thestate, in other nodes, of each cache block from the memory in that node.A node is referred to as the “home node” for cache blocks from thememory assigned to that node. A node is referred to as a “remote node”for a cache block if the node is not the home node for that cache block.Similarly, a cache block is referred to as a local cache block in thehome node for that cache block and as a remote cache block in othernodes.

Generally, a remote node may begin the coherency process by requesting acopy of a cache block from the home node of that cache block using acoherency command. The memory bridge 32 in the remote node, for example,may detect a transaction on the interconnect 22 that accesses the cacheblock and may detect that the remote node does not have sufficientownership of the cache block to complete the transaction (e.g. it maynot have a copy of the cache block at all, or may have a shared copy andmay require exclusive ownership to complete the transaction). The memorybridge 32 in the remote node may generate and transmit the coherencycommand to the home node to obtain the copy or to obtain sufficientownership. The memory bridge 32 in the home node may determine if anystate changes in other nodes are to be performed to grant the requestedownership to the remote node, and may transmit coherency commands (e.g.probe commands) to effect the state changes. The memory bridge 32 ineach node receiving the probe commands may effect the state changes andrespond to the probe commands. Once the responses have been received,the memory bridge 32 in the home node may respond to the remote node(e.g. with a fill command including the cache block).

The remote line directory 34 may be used in the home node to track thestate of the local cache blocks in the remote nodes. The remote linedirectory 34 is updated each time a cache block is transmitted to aremote node, the remote node returns the cache block to the home node,or the cache block is invalidated via probes. As used herein, the“state” of a cache block in a given node refers to an indication of theownership that the given node has for the cache block according to thecoherency protocol implemented by the nodes. Certain levels of ownershipmay permit no access, read-only access, or read-write access to thecache block. For example, in one embodiment, the modified, shared, andinvalid states are supported in the internode coherency protocol. In themodified state, the node may read and write the cache block and the nodeis responsible for returning the block to the home node if evicted fromthe node. In the shared state, the node may read the cache block but notwrite the cache block without transmitting a coherency command to thehome node to obtain modified state for the cache block. In the invalidstate, the node may not read or write the cache block (i.e. the nodedoes not have a valid copy of the cache block). Other embodiments mayuse other coherency protocols (e.g. the MESI protocol, which includesthe modified, shared, and invalid states and an exclusive state in whichthe cache block has not yet been updated but the node is permitted toread and write the cache block, or the MOESI protocol which includes themodified, exclusive, shared, and invalid states and an owned state whichindicates that there may be shared copies of the block but the copy inmain memory is stale). In one embodiment, agents within the node mayimplement the MESI protocol for intranode coherency. Thus, the node maybe viewed as having a state in the internode coherency and individualagents may have a state in the intranode coherency (consistent with theinternode coherency state for the node containing the agent).

Coherency commands are transmitted and received on one of the interfaces30A–30C by the corresponding interface circuit 20A–20C. The interfacecircuits 20A–20C receive coherency commands for transmission from thememory bridge 32 and transmit coherency commands received from theinterfaces 30A–30C to the memory bridge 32 for processing, if thecoherency commands require processing in the node 10. In someembodiments, a coherency command may be received that is passing throughthe node 10 to another node, and does not require processing in the node10. The interface circuits 20A–20C may be configured to detect suchcommands and retransmit them (through another interface circuit 20A–20C)without involving the memory bridge 32.

In the illustrated embodiment, the interface circuits 20A–20C arecoupled to the memory bridge 32 through the switch 18 (although in otherembodiments, the interface circuits 20A–20C may have direct paths to thememory bridge 32). The switch 18 may selectively couple the interfacecircuits 20A–20C (and particularly the Rx circuits 26A–26C in theillustrated embodiment) to other interface circuits 20A–20C (andparticularly the Tx circuits 28A–28C in the illustrated embodiment) orto the memory bridge 32 to transfer received coherency commands. Theswitch 18 may also selectively couple the memory bridge 32 to theinterface circuits 20A–20C (and particularly to the Tx circuits 28A–28Cin the illustrated embodiment) to transfer coherency commands generatedby the memory bridge 32 from the memory bridge 32 to the interfacecircuits 20A–20C for transmission on the corresponding interface30A–30C. The switch 18 may have request/grant interfaces to each of theinterface circuits 20A–20C and the memory bridge 32 for requestingtransfers and granting those transfers. The switch 18 may have an inputpath from each source (the Rx circuits 26A–26C and the memory bridge 32)and an output path to each destination (the Tx circuits 28A–28C and thememory bridge 32), and may couple a granted input path to a grantedoutput path for transmission of a coherency command (or a portionthereof, if coherency commands are larger than one transfer through theswitch 18). The couplings may then be changed to the next granted inputpath and granted output path. Multiple independent input path/outputpath grants may occur concurrently.

In one embodiment, the interfaces 30A–30C may support a set of virtualchannels in which commands are transmitted. Each virtual channel isdefined to flow independent of the other virtual channels, even thoughthe virtual channels may share certain physical resources (e.g. theinterface 30A–30C on which the commands are flowing). These virtualchannels may be mapped to internal virtual channels (referred to asswitch virtual channels herein). The switch 18 may be virtual-channelaware. That is, the switch 18 may grant a coupling between a source anda destination based not only on the ability of the source to transferdata and the destination to receive data, but also on the ability of thesource to transfer data in a particular switch virtual channel and thedestination to receive data on that switch virtual channel. Thus,requests from sources may indicate the destination and the virtualchannel on which data is to be transferred, and requests fromdestinations may indicate the virtual channel on which data may bereceived.

Generally speaking, a node may include one or more coherent agents(dotted enclosure 16 in FIG. 1). In the embodiment of FIG. 1, theprocessors 12A–12N, the L2 cache 36, and the memory controller 14 may beexamples of coherent agents 16. Additionally, the memory bridge 32 maybe a coherent agent (on behalf of other nodes). However, otherembodiments may include other coherent agents as well, such as a bridgeto one or more I/O interface circuits, or the I/O interface circuitsthemselves. Generally, an agent includes any circuit which participatesin transactions on an interconnect. A coherent agent is an agent that iscapable of performing coherent transactions and operating in a coherentfashion with regard to transactions. A transaction is a communication onan interconnect. The transaction is sourced by one agent on theinterconnect, and may have one or more agents as a target of thetransaction. Read transactions specify a transfer of data from a targetto the source, while write transactions specify a transfer of data fromthe source to the target. Other transactions may be used to communicatebetween agents without transfer of data, in some embodiments.

Each of the interface circuits 20A–20C are configured to receive andtransmit on the respective interfaces 30A–30C to which they areconnected. The Rx circuits 26A–26C handle the receiving ofcommunications from the interfaces 30A–30C, and the Tx circuits 28A–28Chandle the transmitting of communications on the interfaces 30A–30C.

Each of the interfaces 30A–30C used for coherent communications aredefined to be capable of transmitting and receiving coherency commands.Particularly, in the embodiment of FIG. 1, those interfaces 30A–30C maybe defined to receive/transmit coherency commands to and from the node10 from other nodes. Additionally, other types of commands may becarried. In one embodiment, each interface 30A–30C may be aHyperTransport™ (HT) interface, including an extension to the HTinterface to include coherency commands (HTcc). Additionally, in someembodiments, an extension to the HyperTransport interface to carrypacket data (Packet over HyperTransport, or POHT) may be supported. Asused herein, coherency commands include any communications between nodesthat are used to maintain coherency between nodes. The commands mayinclude read or write requests initiated by a node to fetch or update acache block belonging to another node, probes to invalidate cachedcopies of cache blocks in remote nodes (and possibly to return amodified copy of the cache block to the home node), responses to probecommands, fills which transfer data, etc.

In some embodiments, one or more of the interface circuits 20A–20C maynot be used for coherency management and may be defined as packetinterfaces. Such interfaces 30A–30C may be HT interfaces. Alternative,such interfaces 30A–30C may be system packet interfaces (SPI) accordingto any level of the SPI specification set forth by the OpticalInternetworking Forum (e.g. level 3, level 4, or level 5). In oneparticular embodiment, the interfaces may be SPI-4 phase 2 interfaces.In the illustrated embodiment, each interface circuit 20A–20C may beconfigurable to communicate on either the SPI-4 interface or the HTinterface. Each interface circuit 20A–20C may be individuallyprogrammable, permitting various combinations of the HT and SPI-4interfaces as interfaces 30A–30C. The programming may be performed inany fashion (e.g. sampling certain signals during reset, shifting valuesinto configuration registers (not shown) during reset, programming theinterfaces with configuration space commands after reset, pins that aretied up or down externally to indicate the desired programming, etc.).Other embodiments may employ any interface capable of carrying packetdata (e.g. the Media Independent Interface (MII) or the Gigabit MII(GMII) interfaces, X.25, Frame Relay, Asynchronous Transfer Mode (ATM),etc.). The packet interfaces may carry packet data directly (e.g.transmitting the packet data with various control information indicatingthe start of packet, end of packet, etc.) or indirectly (e.g.transmitting the packet data as a payload of a command, such as PoHT).

In embodiments which also support packet traffic, the node 10 may alsoinclude a packet direct memory access (DMA) circuit configured totransfer packets to and from the memory 24 on behalf of the interfacecircuits 20A–20C. The switch 18 may be used to transmit packet data fromthe interface circuits 20A–20C to the packet DMA circuit and from thepacket DMA circuit to the interface circuits 20A–20C. Additionally,packets may be routed from an Rx circuit 26A–26C to a Tx circuit 28A–28Cthrough the switch 18, in some embodiments.

The processors 12A–12N may be designed to any instruction setarchitecture, and may execute programs written to that instruction setarchitecture. Exemplary instruction set architectures may include theMIPS instruction set architecture (including the MIPS-3D and MIPS MDMXapplication specific extensions), the IA-32 or IA-64 instruction setarchitectures developed by Intel Corp., the PowerPC instruction setarchitecture, the Alpha instruction set architecture, the ARMinstruction set architecture, or any other instruction set architecture.The node 10 may include any number of processors (e.g. as few as oneprocessor, two processors, four processors, etc.).

The L2 cache 36 may be any type and capacity of cache memory, employingany organization (e.g. set associative, direct mapped, fullyassociative, etc.). In one embodiment, the L2 cache 36 may be an 8 way,set associative, 1 MB cache. The L2 cache 36 is referred to as L2 hereinbecause the processors 12A–12N may include internal (L1) caches. Inother embodiments the L2 cache 36 may be an L1 cache, an L3 cache, orany other level as desired.

The memory controller 14 is configured to access the memory 24 inresponse to read and write transactions received on the interconnect 22.The memory controller 14 may receive a hit signal from the L2 cache, andif a hit is detected in the L2 cache for a given read/write transaction,the memory controller 14 may not respond to that transaction. The memorycontroller 14 may be designed to access any of a variety of types ofmemory. For example, the memory controller 14 may be designed forsynchronous dynamic random access memory (SDRAM), and more particularlydouble data rate (DDR) SDRAM. Alternatively, the memory controller 16may be designed for DRAM, DDR synchronous graphics RAM (SGRAM), DDR fastcycle RAM (FCRAM), DDR-II SDRAM, Rambus DRAM (RDRAM), SRAM, or any othersuitable memory device or combinations of the above mentioned memorydevices.

The interconnect 22 may be any form of communication medium between thedevices coupled to the interconnect. For example, in variousembodiments, the interconnect 22 may include shared buses, crossbarconnections, point-to-point connections in a ring, star, or any othertopology, meshes, cubes, etc. The interconnect 22 may also includestorage, in some embodiments. In one particular embodiment, theinterconnect 22 may comprise a bus. The bus may be a split transactionbus, in one embodiment (i.e. having separate address and data phases).The data phases of various transactions on the bus may proceed out oforder with the address phases. The bus may also support coherency andthus may include a response phase to transmit coherency responseinformation. The bus may employ a distributed arbitration scheme, in oneembodiment. In one embodiment, the bus may be pipelined. The bus mayemploy any suitable signaling technique. For example, in one embodiment,differential signaling may be used for high speed signal transmission.Other embodiments may employ any other signaling technique (e.g. TTL,CMOS, GTL, HSTL, etc.). Other embodiments may employ non-splittransaction buses arbitrated with a single arbitration for address anddata and/or a split transaction bus in which the data bus is notexplicitly arbitrated. Either a central arbitration scheme or adistributed arbitration scheme may be used, according to design choice.Furthermore, the bus may not be pipelined, if desired.

Various embodiments of the node 10 may include additional circuitry, notshown in FIG. 1. For example, the node 10 may include various I/Odevices and/or interfaces. Exemplary I/O may include one or more PCIinterfaces, one or more serial interfaces, Personal Computer Memory CardInternational Association (PCMCIA) interfaces, etc. Such interfaces maybe directly coupled to the interconnect 22 or may be coupled through oneor more I/O bridge circuits.

In one embodiment, the node 10 (and more particularly the processors12A–12N, the memory controller 14, the L2 cache 36, the interfacecircuits 20A–20C, the memory bridge 32 including the remote linedirectory 34, the switch 18, the configuration register 38, and theinterconnect 22) may be integrated onto a single integrated circuit as asystem on a chip configuration. The additional circuitry mentioned abovemay also be integrated. Alternatively, other embodiments may implementone or more of the devices as separate integrated circuits. In anotherconfiguration, the memory 24 may be integrated as well. Alternatively,one or more of the components may be implemented as separate integratedcircuits, or all components may be separate integrated circuits, asdesired. Any level of integration may be used.

It is noted that, while three interface circuits 20A–20C are illustratedin FIG. 1, one or more interface circuits may be implemented in variousembodiments. As used herein, an interface circuit includes any circuitryconfigured to communicate on an interface according to the protocoldefined for the interface. The interface circuit may include receivecircuitry configured to receive communications on the interface andtransmit the received communications to other circuitry internal to thesystem that includes the interface circuit. The interface circuit mayalso include transmit circuitry configured to receive communicationsfrom the other circuitry internal to the system and configured totransmit the communications on the interface.

It is noted that the discussion herein may describe cache blocks andmaintaining coherency on a cache block granularity (that is, each cacheblock has a coherency state that applies to the entire cache block as aunit). Other embodiments may maintain coherency on a differentgranularity than a cache block, which may be referred to as a coherencyblock. A coherency block may be smaller than a cache line, a cache line,or larger than a cache line, as desired. The discussion herein of cacheblocks and maintaining coherency therefor applies equally to coherencyblocks of any size.

Additional CC-NUMA Details, One Embodiment

FIGS. 2–6 illustrate additional details regarding one exemplaryembodiment of a CC-NUMA protocol that may be employed by one embodimentof the node 10. The embodiment of FIGS. 2–6 is merely exemplary.Numerous other implementations of CC-NUMA protocols or other distributedmemory system protocols may be used in other embodiments.

Turning next to FIG. 2, a table 42 is shown illustrating an exemplaryset of transactions supported by one embodiment of the interconnect 22and a table 44 is shown illustrating an exemplary set of coherencycommands supported by one embodiment of the interfaces 30. Otherembodiments including subsets, supersets, or alternative sets ofcommands may be used.

The transactions illustrated in the table 42 will next be described. Anagent in the node 10 may read a cache block (either remote or local)using the read shared (RdShd) or read exclusive (RdExc) transactions onthe interconnect 22. The RdShd transaction is used to request a sharedcopy of the cache block, and the RdExc transaction is used to request anexclusive copy of the cache block. If the RdShd transaction is used, andno other agent reports having a copy of the cache block during theresponse phase of the transaction (except for the L2 cache 36 and/or thememory controller 14), the agent may take the cache block in theexclusive state. In response to the RdExc transaction, other agents inthe node invalidate their copies of the cache block (if any).Additionally, an exclusive (or modified) owner of the cache block maysupply the data for the transaction in the data phase. Other embodimentsmay employ other mechanisms (e.g. a retry on the interconnect 22) toensure the transfer of a modified cache block.

The write transaction (Wr) and the write invalidate transaction (WrInv)may be used by an agent to write a cache block to memory. The Wrtransaction may be used by an owner having the modified state for theblock, since no other copies of the block need to be invalidated. TheWrInv transaction may be used by an agent that does not have exclusiveownership of the block (the agent may even have the invalid state forthe block). The WrInv transaction causes other agents to invalidate anycopies of the block, including modified copies. The WrInv transactionmay be used by an agent that is writing the entire cache block. Forexample, a DMA that is writing the entire cache block with new data mayuse the transaction to avoid a read transaction followed by a writetransaction.

The RdKill and RdInv transactions may be used by the memory bridge 32 inresponse to probes received by the node 10 from other nodes. The RdKilland RdInv transactions cause the initiator (the memory bridge 32) toacquire exclusive access to the cache block and cause any cache agentsto invalidate their copies (transferring data to the initiator similarto the RdShd and RdExc transactions). In one embodiment, the RdKilltransaction also cancels a reservation established by the load-linkedinstruction in the MIPS instruction set, while the RdInv transactiondoes not. In other embodiments, a single transaction may be used forprobes. In still other embodiments, there may be a probe-generatedtransaction that invalidates agent copies of the cache block (similar tothe RdKill and RdInv transactions) and another probe-generatedtransaction that permits agents to retain shared copies of the cacheblock.

The WrFlush transaction is a write transaction which may be initiated byan agent and another agent may have an exclusive or modified copy of theblock. The other agent provides the data for the WrFlush transaction, orthe initiating agent provides the data if no other agent has anexclusive or modified copy of the block. The WrFlush transaction may beused, in one embodiment as described above by the L2 cache 36.

The Nop transaction is a no-operation transaction. The Nop may be usedif an agent is granted use of the interconnect 22 (e.g. the address bus,in embodiments in which the interconnect 22 is a split transaction bus)and the agent determines that it no longer has a transaction to run onthe interconnect 22.

The commands illustrated in the table 44 will next be described. In thetable 44, the command is shown as well as the virtual channel in whichthe command travels on the interfaces 30. The virtual channels mayinclude, in the illustrated embodiment: the coherent read (CRd) virtualchannel; the probe (Probe) virtual channel; the acknowledge (Ack)virtual channel; and coherent fill (CFill) virtual channel. The CRd,Probe, Ack, and CFill virtual channels are defined for the HTcccommands. There may be additional virtual channels for the standard HTcommands (e.g. non-posted command (NPC) virtual channel, the postedcommand (PC) virtual channel, and the response (RSP) virtual channel).

The cRdShd or cRdExc commands may be issued by the memory bridge 32 inresponse to a RdShd or RdExc transactions on the interconnect 22,respectively, to read a remote cache block not stored in the node (or,in the case of RdExc, the block may be stored in the node but in theshared state). If the cache block is stored in the node (with exclusiveownership, in the case of the RdExc transaction), the read is completedon the interconnect 22 without any coherency command transmission by thememory bridge 32.

The Flush and Kill commands are probe commands for this embodiment. Thememory bridge 32 at the home node of a cache block may issue probecommands in response to a cRdShd or cRdExc command. The memory bridge 32at the home node of the cache block may also issue a probe command inresponse to a transaction for a local cache block, if one or more remotenodes has a copy of the cache block. The Flush command is used torequest that a remote modified owner of a cache block return the cacheblock to the home node (and invalidate the cache block in the remotemodified owner). The Kill command is used to request that a remote ownerinvalidate the cache block. In other embodiments, additional probecommands may be supported for other state change requests (e.g. allowingremote owners to retain a shared copy of the cache block).

The probe commands are responded to (after effecting the state changesrequested by the probe commands) using either the Kill_Ack or WBcommands. The Kill_Ack command is an acknowledgement that a Kill commandhas been processed by a receiving node. The WB command is a write backof the cache block, and is transmitted in response to the Flush command.The WB command may also be used by a node to write back a remote cacheblock that is being evicted from the node.

The Fill command is the command to transfer data to a remote node thathas transmitted a read command (cRdExc or cRdShd) to the home node. TheFill command is issued by the memory bridge 32 in the home node afterthe probes (if any) for a cache block have completed.

Turning next to FIG. 3, a block diagram illustrating one embodiment ofan address space implemented by one embodiment of the node 10 is shown.Addresses shown in FIG. 3 are illustrated as hexadecimal digits, with anunder bar (“_”) separating groups of four digits. Thus, in theembodiment illustrated in FIG. 3, 40 bits of address are supported. Inother embodiments, more or fewer address bits may be supported.

In the embodiment of FIG. 3, the address space between00_(—)0000_(—)0000 and 0F_FFFF_FFFF is treated as local address space.Transactions generated by agents in the local address space do notgenerate coherency commands to other nodes, although coherency may beenforced within the node 10 for these addresses. That is, the localaddress space is not maintained coherent with other nodes. Variousportions of the local address space may be memory mapped to I/O devices,HT, etc. as desired.

The address space between 40_(—)0000_(—)0000 and EF_FFFF_FFFF is theremote coherent space 48. That is, the address space between40_(—)0000_(—)0000 and EF_FFFF_FFFF is maintained coherent between thenodes. Each node is assigned a portion of the remote coherent space, andthat node is the home node for the portion. As shown in FIG. 1, eachnode is programmable with a node number. The node number is equal to themost significant nibble (4 bits) of the addresses for which that node isthe home node, in this embodiment. Thus, the node numbers may range from4 to E in the embodiment shown. Other embodiments may support more orfewer node numbers, as desired. In the illustrated embodiment, each nodeis assigned a 64 Gigabyte (GB) portion of the memory space for which itis the home node. The size of the portion assigned to each node may bevaried in other embodiments (e.g. based on the address size or otherfactors).

For a given coherent node, there is an aliasing between the remotecoherent space for which that node is the home node and the localaddress space of that node. That is, corresponding addresses in thelocal address space and the portion of the remote coherent space forwhich the node is the home node access the same memory locations in thememory 24 of the node (or are memory mapped to the same I/O devices orinterfaces, etc.). For example, the node having node number 5 aliasesthe address space 50_(—)0000_(—)0000 through 5F_FFFF_FFFF to00_(—)0000_(—)0000 through 0F_FFFF_FFFF respectively (arrow 46).Internode coherent accesses to the memory 24 at the node 10 use thenode-numbered address space (e.g. 50_(—)0000_(—)0000 to 5F_FFFF_FFFF, ifthe node number programmed into node 10 is 5) to access cache blocks inthe memory 24. That is agents in other nodes and agents within the nodethat are coherently accessing cache blocks in the memory use the remotecoherent space, while access in the local address space are notmaintained coherent with other nodes (even though the same cache blockmay be accessed). Thus the addresses are aliased, but not maintainedcoherent, in this embodiment. In other embodiments, the addresses in theremote coherent space and the corresponding addresses in the localaddress space may be maintained coherent.

A cache block is referred to as local in a node if the cache block ispart of the memory assigned to the node (as mentioned above). Thus, thecache block may be local if it is accessed from the local address spaceor the remote coherent space, as long as the address is in the range forwhich the node is the home node. Similarly, a transaction on theinterconnect 22 that accesses a local cache block may be referred to asa local transaction or local access. A transaction on the interconnect22 that accesses a remote cache block (via the remote coherent addressspace outside of the portion for which the node is the home node) may bereferred to as a remote transaction or a remote access.

The address space between 10_(—)0000_(—)0000 and 3F_FFFF_FFFF may beused for additional HT transactions (e.g. standard HT transactions) inthe illustrated embodiment. Additionally, the address space betweenF0_(—)0000_(—)0000 and FF_FFFF_FFFF may be reserved in the illustratedembodiment.

It is noted that, while the most significant nibble of the addressdefines which node is being accessed, other embodiments may use anyother portion of the address to identify the node. Furthermore, otherinformation in the transaction may be used to identify remote versuslocal transactions, in other embodiments (e.g. command type, controlinformation transmitted in the transaction, etc.).

Turning next to FIG. 4, a decision tree for a read transaction to amemory space address on the interconnect 22 of a node 10 is shown forone embodiment. The decision tree may illustrate operation of the node10 for the read transaction for different conditions of the transaction,the state of the cache block accessed by the transaction, etc. The readtransaction may, in one embodiment, include the RdShd, RdExc, RdKill,and RdInv transactions shown in the table 42 of FIG. 2. Each dot on thelines within the decision tree represents a divergence point of one ormore limbs of the tree, which are labeled with the correspondingconditions. Where multiple limbs emerge from a dot, taking one limb alsoimplies that the conditions for the other limbs are not met. In FIG. 4,the exclamation point (“!”) is used to indicate a logical NOT. Not shownin FIG. 4 is the state transition made by each coherent agent which iscaching a copy of the cache block for the read transaction. If the readtransaction is RdShd, the coherent agent may retain a copy of the cacheblock in the shared state. Otherwise, the coherent agent invalidates itscopy of the cache block.

The transaction may be either local or remote, as mentioned above. Forlocal transactions, if the transaction is uncacheable, then a read fromthe memory 24 is performed (reference numeral 50). In one embodiment,the transaction may include an indication of whether or not thetransaction is cacheable. If the transaction is uncacheable, it istreated as a non-coherent transaction in the present embodiment.

If the local transaction is cacheable, the operation of the node 10 isdependent on the response provided during the response phase of thetransaction. In one embodiment, each coherent agent responds with thestate of the cache block in that agent. For example, each coherent agentmay have an associated shared (SHID) and exclusive (EXC) signal. Theagent may signal invalid state by deasserting both the SHD and EXCsignals. The agent may signal shared state by asserting the SHD signaland deasserting the EXC signal. The agent may signal exclusive state (ormodified state) by asserting the EXC signal and deasserting the SHDsignal. The exclusive and modified states may be treated the same in theresponse phase in this embodiment, and the exclusive/modified owner mayprovide the data. The exclusive/modified owner may provide, concurrentwith the data, an indication of whether the state is exclusive ormodified. While each agent may have its own SHD and EXC signals in thisembodiment (and the initiating agent may receive the signals from eachother agent), in other embodiments a shared SHD and EXC signal may beused by all agents.

If both the SHD and EXC responses are received for the localtransaction, an error has occurred (reference numeral 52). The memorycontroller may return a fatal error indication for the read transaction,in one embodiment. If the response is exclusive (SHD deasserted, EXCasserted) the exclusive owner provides the data for the read transactionon the interconnect 22 (reference numeral 54). If the exclusive owner isthe memory bridge 32 (as recorded in the remote line directory 34), thena remote node has the cache block in the modified state. The memorybridge 32 issues a probe (Flush command) to retrieve the cache blockfrom that remote node. The memory bridge 32 may supply the cache blockreturned from the remote node as the data for the read on theinterconnect 22.

If the response is shared (SHD asserted, EXC deasserted), the localtransaction is RdExc, and the memory bridge 32 is one of the agentsreporting shared, then at least one remote node may have a shared copyof the cache block. The memory bridge 32 may initiate a probe (Killcommand) to invalidate the shared copies of the cache block in theremote node(s) (reference numeral 56). In one embodiment, the data maybe read from memory (or the L2 cache 36) for this case, but the transferof the data may be delayed until the remote node(s) have acknowledgedthe probe. The memory bridge 32 may signal the memory controller 14/L2cache 36 when the acknowledgements have been received. In oneembodiment, each transaction may have a transaction identifier on theinterconnect 22. The memory bridge 32 may transmit the transactionidentifier of the RdExc transaction to the memory controller 14/L2 cache36 to indicate that the data may be transmitted.

If the response is shared, the local transaction is RdExc, and thesharing agents are local agents (i.e. the memory bridge 32 does notreport shared), then the L2 cache 36 or the memory controller 14 maysupply the data, depending on whether or not there is an L2 hit for thecache block (reference numeral 58). Similarly, if the response is sharedand the transaction is not RdExc, the L2 cache 36 or the memorycontroller 14 may supply the data dependent on whether or not there isan L2 hit for the cache block.

If the transaction is remote and uncacheable, then the memory bridge 32may generate a noncoherent read command on the interfaces 30 to read thedata. For example, a standard HT read command may be used (referencenumeral 60). If the remote transaction is cacheable and the response onthe interconnect 22 is exclusive, then the exclusive owner supplies thedata for the read (reference numeral 62). If the remote transaction iscacheable, the response is not exclusive, the cache block is an L2 cachehit, and the transaction is either RdShd or the transaction is RdExc andthe L2 cache has the block in the modified state, then the L2 cache 36supplies the data for the read (reference numeral 64). Otherwise, thememory bridge 32 initiates a corresponding read command to the home nodeof the cache block (reference numeral 66).

Turning next to FIG. 5, a decision tree for a write transaction to amemory space address on the interconnect 22 of a node 10 is shown forone embodiment. The decision tree may illustrate operation of the nodefor the write transaction for different conditions of the transaction,the state of the cache block accessed by the transaction, etc. The writetransaction may, in one embodiment, include the Wr, WrInv, and WrFlushtransactions shown in the table 42 of FIG. 2. Each dot on the lineswithin the decision tree represents a divergence point of one or morelimbs of the tree, which are labeled with the corresponding conditions.Where multiple limbs emerge from a dot, taking one limb also impliesthat the conditions for the other limbs are not met. In FIG. 5, theexclamation point (“!”) is used to indicate a logical NOT. Not shown inFIG. 5 is the state transition made by each coherent agent which iscaching a copy of the cache block for the write transaction. Thecoherent agent invalidates its copy of the cache block.

If the transaction is a local transaction, and the transaction is aWrInv transaction that hits in the remote line directory 34 (i.e. aremote node is caching a copy of the cache block), the memory controller14 (and the L2 cache 36, if an L2 hit) updates with the write data(reference numeral 70). Additionally, the memory bridge 32 may generateprobes to the remote nodes indicated by the remote line directory 34.The update of the memory/L2 cache may be delayed until the probes havebeen completed, at which time the memory bridge 32 may transmit thetransaction identifier of the WrInv transaction to the L2 cache36/memory controller 14 to permit the update.

If the local transaction is uncacheable or if the L2 cache 36 is themaster of the transaction (that is, the L2 cache 36 initiated thetransaction), then the memory controller 14 updates with the data(reference numeral 72). If the local transaction is cacheable, thememory controller 14 and/or the L2 cache 36 updates with the data basedon whether or not there is an L2 cache hit (and, in some embodiments,based on an L2 cache allocation indication in the transaction, whichallows the source of the transaction to indicate whether or not the L2cache allocates a cache line for an L2 cache miss) (reference numeral74).

If the transaction is a remote transaction, the transaction is a WrFlushtransaction, and the response to the transaction is exclusive, theexclusive owner supplies the data (reference numeral 76). If the remoteWrFlush transaction results in a non-exclusive response (shared orinvalid), the L2 cache 36 supplies the data of the WrFlush transaction.In one embodiment, the L2 cache 36 retains the state of the node asrecorded in the home node, and the L2 cache 36 uses the WrFlushtransaction to evict a remote cache block which is in the modified statein the node. Thus, if another agent has the cache block in the exclusivestate, that agent may have a more recent copy of the cache block thatshould be returned to the home node. Otherwise, the L2 cache 36 suppliesthe block to be returned to the home node (reference numeral 78). Ineither case, the memory bridge 32 may capture the WrFlush transactionand data, and may perform a WB command to return the cache block to thehome node.

If the remote transaction is not a WrFlush transaction, and is not cachecoherent, the memory bridge 32 receives the write transaction andperforms a noncoherent Wr command (e.g. a standard HT write) to transmitthe cache block to the home node (reference numeral 80). If the remotetransaction is not a WrFlush transaction, is cache coherent, and is anL2 hit, the L2 cache 36 may update with the data (reference numeral 82).

Turning next to FIG. 6, a block diagram illustrating operation of oneembodiment of the memory bridge 32 in response to various coherencycommands received from the interface circuits 20A–20C is shown. Thereceived command is shown in an oval. Commands initiated by the memorybridge 32 in response to the received command (and the state of theaffected cache block as indicated in the remote line directory 34) areshown in solid boxes. Dotted boxes are commands received by the memorybridge 32 in response to the commands transmitted in the preceding solidboxes. The cache block affected by a command is shown in parenthesesafter the command.

In one embodiment, the remote line directory 34 may be accessed inresponse to a transaction on the interconnect 22. In such an embodiment,the memory bridge 32 may initiate a transaction on the interconnect 22in response to certain coherent commands in order to retrieve the remoteline directory 34 (as well as to affect any state changes in thecoherent agents coupled to the interconnect 22, if applicable). In otherembodiments, the memory bridge 32 may be configured to read the remoteline directory 34 prior to generating a transaction on the interconnect22, and may conditionally generate a transaction if needed based on thestate of the remote line directory 34 for the requested cache block.Additionally, in one embodiment, the remote line directory 34 maymaintain the remote state for a subset of the local cache blocks thatare shareable remotely (e.g. a subset of the portion of the remotecoherent space 48 that is assigned to the local node). If a cache blockis requested by a remote node using a coherency command and there is noentry in the remote line directory 34 for the cache block, then a victimcache block may be replaced in the remote line directory 34 (and probesmay be generated to invalidate the victim cache block in remote nodes).In other embodiments, the remote line directory 34 may be configured totrack the state of each cache block in the portion of the remotecoherent space 48 that is assigned to the local node. In suchembodiments, operations related to the victim cache blocks may beomitted from FIG. 6.

For a cRdShd command for cache block “A” received by the memory bridge32 (reference numeral 90), the memory bridge 32 may generate a RdShdtransaction on the interconnect 22. Based on the remote line directory(RLD) state for the cache block A, a number of operations may occur. Ifthe RLD state is shared, or invalid and there is an entry available forallocation without requiring a victim cache block to be evicted (“RLDempty” in FIG. 6), then the memory bridge 32 may transmit a fill commandto the remote node with the data supplied to the memory bridge 32 inresponse to the RdShd transaction on the interconnect 22 (referencenumeral 92). On the other hand, if the RLD state is invalid and aneviction of a victim block is used to free an RLD entry for cache blockA, then the memory bridge 32 may transmit probes to the remote nodeshaving copies of the victim cache block. If the victim cache block isshared, the memory bridge 32 may transmit a Kill command (or commands,if multiple nodes are sharing the victim cache block) for the victimblock (reference numeral 94). The remote nodes respond with Kill_Ackcommands for the victim block (reference numeral 96). If the victimblock is modified, the memory bridge 32 may transmit a Flush command tothe remote node having the modified state (reference numeral 98). Theremote node may return the modified block with a WB command (referencenumeral 100). In either case of evicting a victim block, the memorybridge 32 may, in parallel, generate a Fill command for the cache blockA (reference numeral 92, via arrow 102). Finally, if the RLD state ismodified for the cache block A, the memory bridge 32 may generate aFlush command for the cache block A to the remote node (referencenumeral 104), which responds with a WB command and the cache block A(reference numeral 106). The memory bridge 32 may then transmit the Fillcommand with the cache block A provided via the write back command(reference numeral 92).

In response to a cRdExc command for a cache block A (reference numeral110), operation may be similar to the cRdShd case for some RLD states.Similar to the cRdShd case, the memory bridge 32 may initiate a RdExctransaction on the interconnect 22 in response to the cRdExc command.Similar to the cRdShd case, if the RLD is invalid and no eviction of avictim cache block is needed in the RLD to allocate an entry for thecache block A, then the memory bridge 32 may supply the cache blocksupplied on the interconnect 22 for the RdExc transaction in a fillcommand to the remote node (reference numeral 112). Additionally, if theRLD state is invalid for the cache block A and a victim cache block isevicted from the RLD 34, the memory bridge 32 may operate in a similarfashion to the cRdShd case (reference numerals 114 and 116 and arrow 122for the shared case of the victim block and reference numerals 118 and120 and arrow 122 for the modified case of the victim block). If the RLDstate is modified for the cache block A, the memory bridge 32 mayoperate in a similar fashion to the cRdShd case (reference numerals 124and 126). If the RLD state is shared for the cache block A, the memorybridge 32 may generate Kill commands for each remote sharing node(reference numeral 128). The memory bridge 32 may wait for the Kill_Ackcommands from the remote sharing nodes (reference numeral 130), and thentransmit the Fill command with the cache block A provided on theinterconnect 22 in response to the RdExc transaction (reference numeral112).

In response to a Wr command to the cache block A, the memory bridge 32may generate a Wr transaction on the interconnect 22 (reference numeral140). If the RLD state is invalid for the cache block A, the memorybridge 32 may transmit the write data on the interconnect 22 and the Wrcommand is complete (reference numeral 142). If the RLD state is sharedfor the cache block A, the memory bridge 32 may generate Kill commandsto each remote sharing node (reference numeral 144) and collect theKill_Ack commands from those remote nodes (reference numeral 146) inaddition to transmitting the data on the interconnect 22. If the RLDstate is modified for a remote node, the memory bridge 32 may generate aFlush command to the remote node (reference numeral 148) and receive theWB command from the remote node (reference numeral 150). In oneembodiment, the memory bridge 32 may delay transmitting the write dataon the interconnect 22 until the WB command or Kill_Ack commands arereceived (although the data returned with the WB command may be droppedby the memory bridge 32).

The above commands are received by the memory bridge 32 for cache blocksfor which the node 10 including the memory bridge 32 is the home node.The memory bridge 32 may also receive Flush commands or Kill commandsfor cache blocks for which the node 10 is a remote node. In response toa Flush command to the cache block A (reference numeral 160), the memorybridge 32 may initiate a RdInv transaction on the interconnect 22. Ifthe local state of the cache block is modified, the memory bridge 32 maytransmit a WB command to the home node, with the cache block supplied onthe interconnect 22 in response to the RdInv transaction (referencenumeral 162). If the local state of the cache block is not modified, thememory bridge 32 may not respond to the Flush command (reference numeral164). In this case, the node may already have transmitted a WB commandto the home node (e.g. in response to evicting the cache block locally).In response to a Kill command to the cache block A (reference numeral170), the memory bridge 32 may initiate a RdKill transaction on theinterconnect 22. The memory bridge 32 may respond to the Kill commandwith a Kill_Ack command (reference numeral 172).

In one embodiment, the memory bridge 32 may also be configured toreceive a non-cacheable read (RdNC) command (e.g. corresponding to astandard HT read) (reference numeral 180). In response, the memorybridge 32 may initiate a RdShd transaction on the interconnect 22. Ifthe RLD state is modified for the cache block including the data to beread, the memory bridge 32 may transmit a Flush command to the remotenode having the modified cache block (reference numeral 182), and mayreceive the WB command from the remote node (reference numeral 184).Additionally, the memory bridge 32 may supply data received on theinterconnect 22 in response to the RdShd transaction as a read response(RSP) to the requesting node (reference numeral 186).

Ambiguity and Virtual Channel Handling

As mentioned above, virtual channels may be employed to avoid deadlocksin the system due to dependencies that may exist between operations. Inthe above-described embodiment, dependencies may occur due to therelationship of operations being used to implement internode coherency.In other embodiments, dependencies may not be related to coherentoperation (e.g. dependencies may occur for non-coherent operations suchas I/O operations). Generally, a dependency of a first operation on asecond operation may cause the first operation to complete after thesecond operation. There may be various types of dependencies. Forexample, a logical dependency may occur if the second operation isrequired to complete before the first operation completes. A logicaldependency may exist between a read request and the data that issupplied in response to the read request, for example. Another type ofdependency may be a data dependency. This type of dependency may occurif the first operation uses the result of the second operation, but theoperations are otherwise unrelated. A read operation may be have a datadependency on a preceding operation to the same address, for example,since the data result of the preceding operation may be the data read bythe read operation. Yet another type of dependency may be an orderingdependency. An ordering dependency may exist if the first operation isdefined, by the protocol or protocols implemented by the node, to occurafter the second operation. As used herein, an operation may include anycommunication that is transmitted via a virtual channel. In the presentembodiment, for example, transactions on the interconnect 22 andcoherency commands on the interfaces 30A–30C may be examples ofoperations.

There may be false dependencies between virtual channels and/or betweenoperations in a virtual channel. In some cases, the false dependencieswould cause deadlock if they were real. But since they are false, thedependencies would not necessarily cause deadlock if handled properly.

In the present embodiment, it is possible for the dependencies betweenoperations (and thus between virtual channels) to be ambiguous. Theambiguity may cause a false dependency of a first operation in a firstvirtual channel on a second operation in a second virtual channel. Thesecond operation may have dependencies on other operations, including,e.g., a third operation in the first virtual channel. Thus, the firstoperation may have a dependency on the third operation (due to itsdependency on the second operation). In other cases, some operations inthe first virtual channel may have direct dependencies on otheroperations in the first virtual channel. The first virtual channel, inthis case, is really a merging of two virtual channels into oneambiguous virtual channel. The merging of the two virtual channels maybe performed because a given operation could be placed in either of thevirtual channels (depending on whether or not there is a dependency),but which channel is correct is unclear until after the given operationis allocated resources in one of the channels. Generally, one of the twovirtual channels that are merged into the first virtual channel includesthe operations which may have a dependency on an operation in the otherof the two virtual channels. If the number of operations which may havethe dependency can be bounded by a maximum, then deadlock may be avoidedby providing a number of buffers for the first virtual channel thatexceeds the maximum.

Two examples of false dependencies are illustrated in FIG. 7, althoughvariations on these two examples may occur as well. At the top of FIG.7, a first example of a set of coherency commands initiated in a remotenode to a cache block “A” are shown. That is, the cache block A is aremote cache block for the remote node. First, a cRdExc(A) is initiatedby the remote node, then a WB(A) writing back the cache block isinitiated (e.g. due to the cache block being evicted from the remotenode). Then a cRdExc(A) is initiated again (e.g. due to a cache missafter the eviction). At some point while the second cRdExc(A) isoutstanding, the home node may initiate a Flush(A) to request that theremote node write back the cache block A and invalidate the cache blockA in the remote node.

The ambiguity is in determining which of the cRdExc(A) commands istargeted by the Flush(A) command, illustrated by the arrows 190 and 192.That is, it is ambiguous in the remote node as to whether the Flush(A)command is ordered in the home node after the second cRdExc(A) or beforethe second cRdExc(A). If the Flush(A) command is ordered before thesecond cRdExc(A) in the home node, then the Flush(A) command is targetedat the first cRdExc(A) (arrow 190). For this case, the WB(A) that wouldbe the response to the Flush(A) command has already been initiated. Thatis, the remote node need not respond to the Flush(A) command, as if theFlush(A) command had arrived at the remote node prior the secondcRdExc(A) command and after the WB(A) command. When the home nodereceives the WB(A) command, the Flush(A) command may be completed. Onthe other hand, if the Flush(A) command is ordered after the secondcRdExc(A) in the home node, then the second cRdExc(A) is targeted by theFlush(A) command (arrow 192). The data resulting from the secondcRdExc(A) command is to be returned to the home node as a WB(A) command(not shown in FIG. 7). Since the second case requires the remote node togenerate a response to the Flush(A) command, the Flush(A) command may beassumed to be targeted at the second cRdExc(A) command. If theassumption is incorrect (the Flush(A) is targeted at the first cRdExc(A)command), the already-initiated WB(A) command satisfies the Flush(A)command and coherency is maintained, albeit with an unnecessarily-causedWB(A) for the second cRdExc(A) command. If the assumption is correct,then a second WB(A) command is correctly caused.

Using the above assumption, the memory bridge 32 in the receiving nodemay generate a probe transaction on the interconnect 22 in response tothe Flush(A) command. As used herein, a “probe” refers to an operationinitiated to cause an agent that receives the probe to change itscoherency state for a cache block and to possibly transmit the cacheblock out of the agent (if the agent has a modified copy of the cacheblock). A probe transaction may be a transaction used for probing (e.g.the RdKill and RdInv transactions in table 42). A probe coherencycommand may be a coherency command used to communicate the probe betweennodes (e.g. the Kill and Flush coherency commands). Generally, a probetransaction may be initiated on the interconnect 22 in response toreceiving a probe command in the node 10. The agent that initiated theRdExc(A) transaction that caused the second cRdExc(A) command detects ahit for the probe transaction on an outstanding RdExc(A) transaction,and responds to the probe transaction with an exclusive response (sincethe agent already has exclusive ownership by successfully transmittingthe RdExc(A) transaction on the interconnect 22, even though the agentdoes not yet have a copy of the cache block A). The agent then becomesresponsible for transferring data in response to the probe transaction.Thus, there is a data dependency between the probe transaction and theoutstanding RdExc(A) transaction. The data dependency exists until theFill command for the second cRdExc(A) command is provided and data isforwarded in response to the probe. If the assumption that the Flush(A)command is targeted at the second cRdExc(A) command is wrong, thedependency is false. Furthermore, if the dependency is false, a probemay be generated for the second cRdExc(A) (by the home node), and thusthe probe transaction corresponding to the Flush(A) command may bedependent on another operation in the probe virtual channel (the probegenerated for the second cRdExc(A) command). Additionally, that otheroperation arrives at the agent after the probe transaction correspondingto the Flush(A) command arrives. However, assuming that forward progresscan still be made in the system, the false dependency eventuallyresolves.

Additionally, the memory bridge 32 may allocate resources in the Ackvirtual channel for the WB(A) generated in response to the Flush(A)command. Since the data for the WB(A) command is not supplied until theFill for the second cRdExc(A) command is provided, there is a datadependency between the Ack virtual channel and the CFill virtualchannel. Furthermore, since it is possible that the second cRdExc(A)command has not even started yet (if the Flush(A) command is actuallytargeted at the first cRdExc(A) command), the data dependency translatesto a dependency on the second cRdExc(A) command itself and is a falsedependency. Thus, there is a data dependency of the Ack virtual channelon the CRd virtual channel (since the cRdExc command is in the CRdvirtual channel). The CRd virtual channel also has a logical dependencyon the Ack virtual channel (for returning responses to probes generatedin response to a read), as indicated in FIG. 6 (blocks 130 and 126).Accordingly, Ack virtual channel resources may be needed to complete thecRdExc command, and thus there is a dependency of the WB(A) command onanother operation in the Ack virtual channel. If the resources for theAck virtual channel within a system including 2 or more nodes becomefilled with operations having the false dependency, deadlock may occurbecause forward progress is prevented. Similarly, if the snoop buffersin a processor become filled with false dependencies, forward progressmay be prevented.

The example at the bottom of FIG. 7 is similar, using cRdShd commands tothe cache block A with a silent drop in between and a Kill command fromthe home node while the second cRdShd command is outstanding. It isambiguous whether the Kill(A) command is targeted at the first cRdShd(A)command or the second cRdShd(A) command, so the assumption is made thatthe Kill(A) command is targeted at the second cRdShd(A) command (so thatthe cache block is invalidated in the node if the assumption iscorrect). Since the cRdShd command is in the CRd virtual channel(similar to the cRdExc command) and the Kill command is in the probevirtual channel (similar to the Flush command), the same resourceallocations in the memory bridge 32 and processors occur, and the samefalse dependency may occur.

To handle the false dependency, the node 10 may implement enough buffers(for the virtual channel that includes operations that may have thefalse dependency created in the ambiguous case) to handle the ambiguouscases which create the false dependencies, as well as at least oneadditional buffer that may be used for other cases which do not have afalse dependency. The additional buffer(s) may be used repeatedly andfreed (including being used for the operations on which the ambiguouscases depend) until the ambiguous cases complete, and thus deadlock maybe avoided by permitting forward progress to continue until theambiguous cases complete. Thus, combining the virtual channel containingthe operations having the dependency and the virtual channel includingthe operations on which the dependency occurs may be performed withoutdeadlock.

For example, each processor may have a finite number of RdExctransactions outstanding (e.g. equal to the number of read buffers inthe processor). If each of these transactions experiences the ambiguouscase mentioned above, then an equal number of snoop buffers (to thenumber of read buffers) may be occupied by snoops corresponding to theambiguous case. By including at least one additional snoop buffer, theprocessor may permit additional snoops to occur and complete while theambiguous cases remain outstanding. Similarly, the memory bridge 32 mayhave a finite number of cRdExc(A) coherency commands buffered (e.g.equal to the number of outgoing CRd buffers in the memory bridge 32),and thus having at least one more Ack buffer than CRd buffers in thememory bridge 32 may permit deadlock avoidance. These examples aredescribed in more detail below.

Additionally, the L2 cache 36 may be involved in the ambiguous casessince the L2 cache 36 may retain the node state for remote cache blocks.Thus, if a RdExc transaction to a remote cache block is outstanding onthe interconnect 22, the L2 cache 36 may have a write buffer allocatedto update the cache memory with the remote cache block. In this case,the L2 cache 36 may invalidate the write buffer if a probe to the remotecache block is detected, effectively reusing the write buffer toinvalidate the cache block in the L2 cache 36. Additionally, the L2cache 36 may respond to the transaction by indicating a cache miss. Theprocessor that initiated the RdExc transaction responds exclusive inthis case, and may provide data. By responding miss, a read buffer tosupply the cache block need not be allocated in the ambiguous case.Similarly, for the RdShd outstanding case, the L2 cache may invalidatethe write buffer (that is to update the cache memory with the cacheblock in the shared state) and respond miss to the probe transaction. Inthis case, the memory bridge 32 may supply a false data on theinterconnect 22 to complete the probe transaction, but the data is notused since there is no modified data to transfer back to the home node.Thus, additional buffers need not be provided in the L2 cache 36 forthis embodiment.

The present description refers to transactions or coherency commandsbeing “outstanding”. A transaction may be outstanding if the addressportion of the transaction has been transmitted on the interconnect 22,but the data portion of the transaction has not yet been transmitted. Acoherency command may be outstanding if it has been generated by thememory bridge 32 (e.g. in response to a transaction) but not yettransmitted.

Turning now to FIG. 8, a block diagram of one embodiment of a portion ofthe processor 12A is shown. Other processors 12B–12N may be similar. Inthe embodiment of FIG. 8, the processor 12A includes a snoop tags memory200, a snoop control circuit 202, one or more read buffers 204, and aplurality of snoop buffers 206. The read buffers 204 are coupled toreceive read transactions from the processor core (not shown in FIG. 8),coupled to the snoop buffers 206, coupled to the snoop control circuit202, and coupled to supply read transactions for transmission on theinterconnect 22. The snoop buffers 206 are coupled to the snoop controlcircuit 202 and the snoop tags memory 200, coupled to receive data fromthe processor core, coupled to receive snoops from the interconnect 22,and coupled to supply data to the interconnect 22. As mentioned above,there is at least one more snoop buffer 206 than there are read buffers204. That is, the number of snoop buffers 206 exceeds the number of readbuffers 204.

Generally, the processor core inserts read transactions into the readbuffers 204 in response to misses in a data cache within the processorcore (not shown). The read transactions may be RdExc transactions ifexclusive access is desired (e.g. to update the cache block with storedata), or RdShd transactions if shared access is desired (e.g. to readthe cache block for one or more load instructions). There may be one ormore read buffers 204 in various embodiments, as desired. The controlcircuit 202 allocates a read buffer in the read buffers 204 to store aread transaction inserted by the processor core. Read transactions maybe selected out of the read buffers 204 for transmission on theinterconnect 22. The control circuit 202 may also deallocate readbuffers as the read transactions stored therein are completed. The readtransactions may belong to the CRd virtual channel, unless they areperformed non-coherently.

Exemplary read buffer contents are illustrated for two of the readbuffers 204. The contents may include, for example, a type field (T), anaddress field (Addr), a state field (S), and a dependency indication(D). The type field may indicate the type of read transaction (e.g.RdShd or RdExc, in this embodiment). The address field may store theaddress of the cache block accessed in response to the transaction. Thestate field may indicate whether or not the transaction is outstanding(e.g. whether or not the transaction has occurred on the interconnect22), the snoop response received for the transaction, etc. Thedependency indication may indicate whether or not a dependency has beendetected for a snoop in one of the snoop buffers. The dependencyindication may simply indicate the dependency (or lack thereof), or mayalso identify the snoop buffer containing the snoop for which thedependency is detected. Any other desired dependency information mayalso be stored, as desired. Any other read buffer contents that aredesired may be included in various embodiments (e.g. transaction ID forthe transaction, cache attributes, etc.).

The processor 12A may also snoop transactions initiated by other agentson the interconnect 22. For each snoop that occurs, the control circuit202 may allocate a snoop buffer 206 and may snoop the processor 12A. Inthe present embodiment, the processor 12A implements the snoop tagsmemory 200. The snoop tags memory 200 stores tags of cache blocks thatare cached in the processor core (e.g. in one or more data cachesimplemented in the processor core). Each tag includes the address of thecache block and indicates the state of the cache block in the processorcore. In other embodiments, the processor core may be snooped directly.Additionally, transactions may be outstanding in the read buffers 204(and thus the cache blocks accessed by the transactions may not yet becached in the caches within the processor core). Accordingly, the readbuffers are snooped as well. Depending on the results of the snoop, thecontrol circuit 202 may generate a response to be transmitted on theinterconnect 22 for the snooped transaction.

If the snoop hits modified (or exclusive, in one embodiment) in theprocessor core/read buffers 204, data comprising the cache block issupplied by the processor 12A in response to the snooped transaction.The snoop buffers 206 are coupled to receive the data from the processorcore, and may supply the data for transmission on the interconnect 22.If the snoop does not hit modified (or exclusive), the control circuit202 may free the snoop buffer corresponding to the snoop once the snoopresponse is determined and any internal state update has been made. Ifthe snoop does hit modified (or exclusive), the snoop buffer may not befreed until the data is provided in response to the snooped transaction.

Exemplary snoop buffer contents are illustrated for two of the snoopbuffers 206 in FIG. 8. The contents may include, for example, a typeindication, an address field (Addr), a data field (Data), and atransaction identifier (TID). The type indication may indicate whetherthe snoop is a request for exclusive access (e.g. a RdExc, RdKill, orRdInv transaction) or shared access (e.g. a RdShd transaction). Theaddress field may contain the address of the snoop transaction. The datafield may store the data to be provided in response to the snooptransaction. The TID may identify the snoop transaction on theinterconnect 22, and may be used to transmit the data if a snoop hitmodified (or exclusive) is detected. Generally, the interconnect 22 mayimplement TIDs to link the address and data phases of transactions toeach other, permitting out of order data phases with respect to theaddress phases. Other embodiments may include other contents as desired.

In the present embodiment, the snooped transactions may include probetransactions initiated by the memory bridge 32, as well as snooped localtransactions initiated by other agents on the interconnect 22. Thus, thesnoop buffers 206 are each configured to store operations belonging tothe probe virtual channel (probe transactions). Additionally, the snoopbuffers 206 are each configured to store snooped local transactions, inthis embodiment. In the present embodiment, the probe transactions andlocal RdExc transactions are treated similarly: invalidation of thecache block in the processor 12A and transfer of the cache block in thedata phase of the snooped transaction if the state (prior toinvalidation) is modified or exclusive. For local RdShd transactions,the cache block may be changed to the shared state (if applicable) andmay be transferred if the state (prior to being changed) is modified orexclusive. Other embodiments may include probe transactions that permitthe cache block to remain shared, and such probe transactions may betreated similar to local RdShd transactions. While exclusive andmodified are treated the same in this embodiment for snooping purposes(e.g. causing a transfer of the cache block from the processor 12A),other embodiments may only transfer the cache block if the cache blockis in the modified state.

As mentioned above, the ambiguous case that may create the falsedependency occurs for the processor 12A if a snoop hits an outstandingRdExc transaction in the read buffers 204 (that is, the address has beentransmitted on the interconnect 22 but the data has not yet beenreceived from the interconnect 22). The ambiguous case for the RdShdtransaction may also occur in the processor 12A if the processor 12Aretains the probe in the snoop buffers 206 to invalidate the cache blockreceived in response to the RdShd transaction. At most, the ambiguouscase may occur once for each of the read buffers 204 (and acorresponding snoop buffer 206). Thus, at least one snoop buffer may beused to make forward progress even if each read buffer 204 is stalledwith the ambiguous case.

It is noted that, while the embodiment of the processor 12A shown inFIG. 9 records the dependency of the snoop on the read transaction inthe read buffers 204 and the processor core supplies the cache block tothe snoop buffers 206 to satisfy the dependency, other embodiments maybe implemented in other fashions. For example, the dependency may berecorded in the snoop buffers 206. The read transaction on which thesnoop depends may complete normally, storing the cache block in thecache (and in the case of the read exclusive, permitting at least oneupdate of the cache block). The snoop buffer 206 may then transmit thedependent snoop to the processor core cache to invalidate the cacheblock and retrieve the cache block data for transmission as the dataphase of the snooped transaction.

It is noted that, in various embodiments, the processor 12A may includevarious logic circuitry for interfacing with the interconnect 22 and/ortemporary buffering to and from the interconnect 22, not shown in FIG.8. It is further noted that, while snooping is illustrated occurringfrom the snoop buffers 206, a snoop may be performed in parallel withallocation of the snoop buffer.

FIG. 9 is a flowchart illustrating operation of one embodiment of thecontrol circuit 202 in response to a snoop being received by theprocessor 12A (that is, in response to a coherent transaction beingperformed by another agent on the interconnect 22). While the blocks areshown in FIG. 9 in a particular order for ease of understanding, otherorders may be used. Furthermore, blocks may be performed in parallel bycombinatorial logic in the control circuit 202. Blocks may be performedover multiple clock cycles in a pipelined fashion.

The control circuit 202 allocates a snoop buffer for the snoopedtransaction (block 210). The control circuit 202 may cause the addressof the snoop, the type, and the TID of the snooped transaction to bestored in the snoop buffer.

The state of the cache block affected by the snoop is determined. If thestate is not exclusive (which includes both exclusive and modified forthis embodiment) (decision block 212, “no” leg), the control circuit 202performs shared snoop processing (e.g. the shared snoop response isprovided and the cache block is invalidated or remains shared, dependingon the snoop type) (block 214).

If the state is exclusive (decision block 212, “yes” leg), the controlcircuit 202 may generate an exclusive response for the snoopedtransaction (block 216). The state may be exclusive in the caches (asindicated by the snoop tags memory 200) or in the read buffers 204 (if aRdExc transaction is outstanding to the address of the snoopedtransaction). If a RdExc transaction is not outstanding to the addressof the snooped transaction (decision block 218, “no” leg), the controlcircuit 202 performs exclusive snoop processing (e.g. providing the datafrom the processor core caches on the interconnect 22 with the TID fromthe snoop buffer and invalidating the cache block in the caches) (block220).

If a RdExc transaction is outstanding to the address of the snoopedtransaction (decision block 218, “yes” leg), the control circuit 202 mayupdate the dependency indication in the read buffer storing the RdExctransaction to indicate the dependency (block 222). At some later point,the data is provided for the RdExc transaction. The processor 12A mayuse the data once and then provide the data back to the snoop buffer 206corresponding to the snooped transaction (block 224). The controlcircuit 202 causes the snoop buffer 206 to supply the data and the TIDfor transmission on the interconnect 22 (block 226), and the snoopbuffer is then deallocated (block 228).

It is noted that, once an outstanding RdExc transaction has been snoophit, the state of the transaction may no longer be exclusive. Thus, thedecision block 218 may represent detecting a RdExc transaction asoutstanding in a given read buffer if the transaction is outstanding andthe dependency indication in the given read buffer does not indicate adependent snoop has been detected.

It is noted that other agents on the interconnect 22 (e.g. otherprocessors 12B–12N or an I/O bridge that performs coherent transactions)may be similar to the processor 12A as described above with regard toFIGS. 8–9.

Turning now to FIG. 10, a block diagram of a portion of one embodimentof the memory bridge 32 is shown. In the embodiment of FIG. 10, thememory bridge includes a control circuit 230, one or more outgoing CRdbuffers 232, and a plurality of outgoing Ack buffers 234. As illustratedin FIG. 10, there is at least one more Ack buffer 234 than there is CRdbuffers 232. That is, a number of the Ack buffers 234 exceeds the numberof CRd buffers 232. The control circuit 230 is coupled to the CRdbuffers 232 and the Ack buffers 234. Additionally, the control circuit230, the CRd buffers 232, and the Ack buffers 234 are coupled to receiveinformation from the interconnect 22.

The CRd buffers 232 store operations belonging to the CRd virtualchannel. In the present embodiment, the operations comprise coherentread commands generated in response to remote read transactions on theinterconnect 22. For example, the coherent read commands may cRdExc andcRdShd coherency commands, in the present embodiment. A remote readtransaction is a read transaction to a remote cache block. The CRdbuffers 232 are referred to as “outgoing” because the coherent readcommands stored therein are to be transmitted out of the node 10 to thehome node of the affected cache blocks. Other buffers, not shown, areused to store “incoming” operations in the CRd virtual channel (e.g.coherent read commands) received from the interfaces 30A–30C (for whichthe node 10 is the home node). The CRd buffers 232 may receive theaddress of remote read transactions from the interconnect 22, as well asthe type of read transaction. The control circuit 230 allocates one ofthe CRd buffers 232 to store the coherent read command, and deallocatesthe buffer once the coherent read command is sent to one of theinterface circuits 20A–20C for transmission out of the node 10.

Exemplary contents of two of the CRd buffers 232 are shown in FIG. 10.Other contents may be included in various embodiments as well, asdesired. The contents of each buffer may include a type field (T)indicating the type of coherent read command, an address field (Addr)storing the address of the coherent read command, and any other desiredinformation (Other).

The Ack buffers 234 store operations belonging to the Ack virtualchannel. In the present embodiment, for example, the Ack buffers 234 maystore Kill_Ack coherency commands and WB coherency commands. A Kill_Ackcoherency command is generated in response to a Kill probe beingtransmitted on the interconnect 22 by the memory bridge 32 (as a RdKilltransaction, in the present embodiment). The Kill probe is received bythe node 10 from another node, and the Kill_Ack coherency command isstored in the Ack buffers 234 for transmission out of the node 10 (tothe node that transmitted the Kill probe). A WB coherency command may begenerated in response to any probe (Kill or Flush) which results in anexclusive response on the interconnect 22, to transmit the affectedcache block out of the node 10. Thus, similar to the CRd buffers 232,the Ack buffers 234 are referred to as “outgoing”. Other Ack buffers(not shown in FIG. 10) may be used for incoming operations in the Ackvirtual channel. In the present embodiment, the control circuit 230 mayallocate one Ack Buffer 234 for each probe, which may store a Kill_Ack,and WB, or both. In other embodiments, a buffer may be used for each ofthe Kill_Ack and WB commands, and thus the control circuit 230 mayallocate one or two Ack buffers 234 depending on the possible responsesto the probe command being issued on the interconnect 22. In suchembodiments, there may be at least two more Ack buffers 234 than thereare CRd buffers 232. The control circuit 230 allocates an Ack buffer 234in response to a probe being placed on the interconnect 22. The controlcircuit 230 deallocates the Ack buffer responsive to transmitting thecoherency commands therein or, in the case of a WB coherency command, inresponse to a non-exclusive response on the interconnect 22 to theprobe.

More particularly, a Kill probe results in a Kill_Ack coherency command,and may also result in a WB coherency command. The Kill_Ack coherencycommand may be transmitted out of the node 10 at any time after thecorresponding Kill probe is initiated on the interconnect 22 (as aRdKill transaction). However, if a response of exclusive is received forthe probe transaction on the interconnect 22, then a WB coherencycommand is also generated. Such a response may occur, for example, if aRdExc transaction has been previously initiated on the interconnect 22but the corresponding cRdExc coherency command has not yet reached thehome node (or has been ordered behind the command that caused the Killprobe to be transmitted). However, since the agent that initiated theRdExc transaction has been probed and will transmit the cache block inresponse to the probe, the memory bridge 32 accepts the cache block andreturns it to the home node.

Exemplary contents of two of the Ack buffers 234 are illustrated in FIG.10. Additional contents may be provided in various embodiments, asdesired. Each Ack buffer may include a type field (T) indicating thetype of coherency command (Kill_Ack or WB or both), an address field(Addr) storing the address of the affected cache block, and a data field(Data) storing the data comprising the cache block (for WB coherencycommands).

As mentioned above, the ambiguous case occurs if a probe is transmittedon the interconnect 22 by the memory bridge 32 and a coherent readcommand (cRdExc or cRdShd) is queued in the CRd buffers 232 for the samecache block as affected by the probe. Thus, the ambiguous case mayoccur, at most, once for each CRd buffer 232. By including at least onemore Ack buffer 234 than CRd buffers 232, at least one Ack buffer 234may be used to make forward progress even if the maximum number ofambiguous cases exist.

It is noted that, in various embodiments, the memory bridge 32 mayinclude various logic circuitry for interfacing with the interconnect 22and/or temporary buffering to and from the interconnect 22, not shown inFIG. 10. Similarly, various logic circuitry and/or temporary bufferingmay be included in the memory bridge 32 for interfacing with the switch18.

Turning next to FIG. 11, a flowchart is shown illustrating operation ofone embodiment of the control circuit 230 in response to the memorybridge 32 transmitting a probe transaction on the interconnect 22. Theprobe transaction may be transmitted by the memory bridge 32 in responseto receiving a probe coherency command, as described above. While theblocks are shown in FIG. 11 in a particular order for ease ofunderstanding, other orders may be used. Furthermore, blocks may beperformed in parallel by combinatorial logic in the control circuit 230.Blocks may be performed over multiple clock cycles in a pipelinedfashion.

In response to transmitting the probe transaction on the interconnect22, the control circuit 230 allocates an Ack buffer 234 (block 240). Inthe present embodiment, the Ack buffer 234 may store a Kill_Ackcoherency command, a WB coherency command, or both.

If the probe is a Kill, the Kill_Ack coherency command may betransmitted at any time. This action is represented in the flowchart ofFIG. 11 with the decision block 242 and the block 244. This action maybe independent of the other activities in the flowchart, and may beperformed in parallel. However, the Ack buffer may not be freed (block248 or 252) until the Kill_Ack command has been transmitted.

The control circuit 230 senses the probe response to the probe on theinterconnect 22 (decision block 246). If the probe response is notexclusive, than a WB coherency command is not needed (decision block246, “no” leg). In this case (assuming the Kill_Ack coherency commandhas been transmitted, as mentioned above) the control circuit 230 maydeallocate the Ack buffer 234 (block 248).

If the probe response is exclusive (decision block 246, “yes” leg), thecontrol circuit 230 may wait for the data provided on the interconnect22 in the data phase of the probe transaction (block 250). The controlcircuit 230 may store the data in the Ack buffer 234. The WB coherencycommand may be sent to one of the interface circuits 20A–20C fortransmission out of the node 10, and then the Ack buffer 234 may bedeallocated (block 252).

Turning next to FIG. 12, a block diagram of a portion of one embodimentof the L2 cache 36 is shown. In the embodiment of FIG. 12, the L2 cache36 includes a cache control circuit 260, a cache memory 262, a set ofone or more cache read buffers 264, and a set of one or more cache writebuffers 266. The cache memory 262 is coupled to the cache read buffers264 and the cache write buffers 266. The cache control circuit 260 isalso coupled to the cache read buffers 264 and the cache write buffers266, and is further coupled to receive information from the interconnect22 and to supply a hit/miss indication (L2Hit). The cache read buffers264 and cache write buffers 266 are coupled to receive information fromthe interconnect 22 as well.

The cache memory 262 may include storage for cache blocks of data, aswell as tags. The tags may indicate the address of the cache block, andmay include state information (e.g. the MESI state of the cache block inthe L2 cache 36). Generally, the cache read buffers 264 are used tostore read operations for the cache memory 262, and the cache writebuffers 266 are used to store write operations for the cache memory 262.That is, “read” and “write” in the context of the buffers 264 and 266refers to the operation performed on the cache memory 262. Varioustransactions on the interconnect 22 may generate a read operation, awrite operation, or both. For example, a read operation may be used todetermine if the transaction is a hit in the cache memory 262, and toretrieve the data from the cache memory 262 if a hit is detected. A readoperation may be used to read an evicted cache block from the cachememory 262 if the cache block is dirty, to write the cache block back tomemory (or to the memory bridge 32, if the cache block is a remote cacheblock). A write operation may be used to store a cache block in thecache memory 262, or to update the MESI state of the cache block in thecache memory 262.

The cache control circuit 260 may allocate a cache read buffer 264and/or a cache write buffer 266 to each transaction, and informationfrom the transaction may be stored into the allocated buffer. Forexample, exemplary contents of two cache read buffers 264 and cachewrite buffers 266 are illustrated in FIG. 12. Other embodiments mayinclude additional contents, as desired. Each cache read buffer 264 mayinclude a type field (T) indicating the type of transactioncorresponding to the read, an address field to store the address of thetransaction, and a TID field for the transaction ID of the transaction(used to identify the data if a cache hit is detected for the read andthe data is transmitted by the L2 cache 36 on the interconnect 22). Eachcache write buffer 266 may include an address field identifying theaddress of the cache block, and a data field comprising the data to bewritten to the cache memory 260. The data may include cache block dataand/or tag data, such as the MESI state to be stored in the cache memory260. The cache control circuit 260 deallocates a cache read buffer 264in response to performing the read and, if data is to be transmitted onthe interconnect 22 in response to the read, in response to transmittingthe data on the interconnect 22. The cache control circuit 260deallocates a cache write buffer 266 in response to performing the writeto the cache memory 262.

As mentioned above, the ambiguous case may occur if a remote readtransaction is outstanding at the time a probe occurs to the same cacheblock as the remote read transaction. If a remote read exclusivetransaction is outstanding, then a cache write buffer 266 has beenallocated to store the remote cache block in the L2 cache 36 with amodified state. If a probe is received which hits the write buffer, thecache control circuit 260 may modify the state portion of the data to bewritten to the cache memory 262 to the invalid state. Additionally,since a processor or other agent also has the remote read exclusivetransaction outstanding at the same time, the cache control circuit 260may cause the L2 cache 36 to respond miss to the probe transaction onthe interconnect 22. The agent that initiated the remote read exclusivetransaction may respond exclusive and may supply the data for the probe,as discussed above with regard to the processor 12A. Similarly, if aremote read shared transaction is outstanding, no data need be suppliedin response to the probe. The L2 cache 36 may respond miss in this caseas well.

In the above manner, the cache control circuit 260 may avoid allocatinga cache read buffer 264 (for a snoop of the cache memory 262 andpossible return of data) or a cache write buffer 264 (for an update ofthe cache memory 262) in the ambiguous cases. Thus, no dependencies maybe created in the L2 cache 36 in the ambiguous case, and deadlock may beavoided.

It is noted that, in various embodiments, the L2 cache 36 may includevarious logic circuitry for interfacing with the interconnect 22 and/ortemporary buffering to and from the interconnect 22, not shown in FIG.12.

Turning next to FIG. 13, a flowchart is shown illustrating operation ofone embodiment of the control circuit 260 in response to receiving aprobe transaction from the interconnect 22. While the blocks are shownin FIG. 13 in a particular order for ease of understanding, other ordersmay be used. Furthermore, blocks may be performed in parallel bycombinatorial logic in the control circuit 260. Blocks may be performedover multiple clock cycles in a pipelined fashion.

The control circuit 260 determines if the probe transaction hits in acache write buffer 266 (decision block 270). That is, the controlcircuit 260 determines if the probe transaction identifies a same cacheblock as the write in the cache write buffer 266 (e.g. by comparing theaddress in the cache write buffer 266 to the address of the probetransaction). If the probe transaction does not hit the cache writebuffer (decision block 270, “no” leg), the cache control circuit 260 maysnoop the cache memory 262 (allocating a read buffer 264 for thepurpose) and respond accordingly (block 272). On the other hand, if theprobe transaction does hit a cache write buffer 266 (decision block 270,“yes” leg), the control circuit 260 changes the state of the cache blockin the write buffer 266 to invalid (block 274). Additionally, thecontrol circuit 260 generates a miss response for the probe transaction(block 276).

It is noted that, in one embodiment, flow control may be implemented onthe interconnect 22 using a set of block signals. Each agent may haveone or more block signals, and may indicate its ability to acceptcertain transactions using the block signals. If a block signal isasserted, then the agent may be indicating that it may not accesstransactions of the type(s) indicated by that block signal. An agentpreparing to source a transaction on the interconnect 22 may check theblock signals of agents that would participate in that transaction todetermine if the transaction may be initiated. In one implementation,the processors 12A–12N may each implement a block signal, and may assertthe block signal if its snoop buffers are full. In the implementation,the L2 cache 36 may implement a first block signal used for probes (usedby the memory bridge 32), a second block signal for CRd requests, andfor non-posted and posted HT commands, by the memory bridge 32, and athird block signal for other requests. The cache read and write buffersmay be implemented as pools of buffers that may be used for any of thethree types of transactions represented by the three block signals, withat least one buffer reserved for each block signal. In theimplementation, the memory bridge 32 may implement a separate blocksignal for each outgoing virtual channel.

Computer Accessible Medium

Turning next to FIG. 14, a block diagram of a computer accessible medium300 including one or more data structures representative of thecircuitry included in the node 10 is shown. Generally speaking, acomputer accessible medium may include storage media such as magnetic oroptical media, e.g., disk, CD-ROM, or DVD-ROM, volatile or non-volatilememory media such as RAM (e.g. SDRAM, RDRAM, SRAM, etc.), ROM, etc., aswell as media accessible via transmission media or signals such aselectrical, electromagnetic, or digital signals, conveyed via acommunication medium such as a network and/or a wireless link.

Generally, the data structure(s) of the circuitry on the computeraccessible medium 300 may be read by a program and used, directly orindirectly, to fabricate the hardware comprising the circuitry. Forexample, the data structure(s) may include one or more behavioral-leveldescriptions or register-transfer level (RTL) descriptions of thehardware functionality in a high level design language (HDL) such asVerilog or VHDL. The description(s) may be read by a synthesis toolwhich may synthesize the description to produce one or more netlist(s)comprising lists of gates from a synthesis library. The netlist(s)comprise a set of gates which also represent the functionality of thehardware comprising the circuitry. The netlist(s) may then be placed androuted to produce one or more data set(s) describing geometric shapes tobe applied to masks. The masks may then be used in various semiconductorfabrication steps to produce a semiconductor circuit or circuitscorresponding to the circuitry. Alternatively, the data structure(s) oncomputer accessible medium 300 may be the netlist(s) (with or withoutthe synthesis library) or the data set(s), as desired. In yet anotheralternative, the data structures may comprise the output of a schematicprogram, or netlist(s) or data set(s) derived therefrom.

While computer accessible medium 300 includes a representation of thenode 10, other embodiments may include a representation of any portionof the node 10 (e.g. processors 12A–12N, memory controller 14, L2 cache36, interconnect 22, memory bridge 32, remote line directory 34, switch18, interface circuits 22A–22C, etc.).

Numerous variations and modifications will become apparent to thoseskilled in the art once the above disclosure is fully appreciated. It isintended that the following claims be interpreted to embrace all suchvariations and modifications.

1. An apparatus comprising: a first plurality of buffers configured tostore operations belonging to a first virtual channel during use, thefirst virtual channel including first operations and second operations,wherein at least one of the first operations depends on at least one ofthe second operations during use, and wherein a first number of thefirst operations to be in execution is less than or equal to a maximumnumber of operations; and a control circuit coupled to the firstplurality of buffers and configured to control allocation anddeallocation of the first plurality of buffers; wherein it is ambiguous,for a first received operation in the first virtual channel, whether thefirst received operation is one of the first operations or the secondoperations, and wherein a total number of the first plurality of buffersexceeds a number corresponding to the maximum number of operations. 2.The apparatus as recited in claim 1 wherein at least one of the firstoperations is falsely dependent on one or more second operations.
 3. Theapparatus as recited in claim 1 further comprising a second one or morebuffers configured to store operations belonging to a second virtualchannel during use, and wherein the control circuit is coupled to thesecond one or more buffers and is configured to control allocation anddeallocation of the second one or more buffers, and wherein, in at leastsome cases, one of the first operations in the first virtual channel isdependent on a third operation in the second virtual channel, andwherein the third operation is further dependent on one of the secondoperations in the first virtual channel, whereby the one of the firstoperations is dependent on the one of the second operations, and whereinthe maximum is a number of the second one or more buffers.
 4. Theapparatus as recited in claim 3 wherein the apparatus is implemented ina processor, and wherein the first plurality of buffers are snoopbuffers, and wherein the second buffers are one or more read buffers. 5.The apparatus as recited in claim 4 wherein the processor is configuredto insert read transactions in the second buffers for transmission on aninterconnect to which the processor is coupled.
 6. The apparatus asrecited in claim 5 wherein the dependency occurs if a first readtransaction in one of the second buffers is initiated on theinterconnect but a data transfer for the first read transaction has notyet occurred on the interconnect, and a probe addressing a same cacheblock as the first read transaction is received from the interconnectinto one of the first plurality of buffers.
 7. The apparatus as recitedin claim 6 wherein the dependency is a data dependency.
 8. The apparatusas recited in claim 7 wherein the dependency is satisfied by theprocessor providing the cache block received in response to the firstread transaction, after at least one use by the processor, as the datain response to the probe.
 9. The apparatus as recited in claim 3 whereinthe apparatus is implemented in a memory bridge that is responsible forinternode coherency within a node, and wherein the first plurality ofbuffers are assigned to an acknowledge virtual channel that includesacknowledge coherency commands and writeback coherency commands, andwherein the second buffers are assigned to a coherent read virtualchannel that includes coherent read commands.
 10. The apparatus asrecited in claim 9 wherein the memory bridge is configured to insertcoherent read coherency commands into the second buffers in response toremote read transactions on the interconnect within the node.
 11. Theapparatus as recited in claim 10 wherein the dependency occurs if afirst read coherency command is outstanding in the second buffers and aprobe on the interconnect causes a writeback of a same cache block asaddressed by the first read coherency command.
 12. The apparatus asrecited in claim 11 wherein the dependency is a data dependency.
 13. Aprocessor comprising: a plurality of snoop buffers, each of theplurality of snoop buffers configured to store a probe from a probevirtual channel during use, wherein a first probe has a transactiondependency on a second probe; one or more read buffers, each of the readbuffers configured to store a read transaction generated by theprocessor for transmission on an interconnect to which the processor iscoupled during use, wherein the first probe has a dependency on one ofthe read transactions in the one or more read buffers, in which thedependency on the second probe is generated; and a control circuitcoupled to the plurality of snoop buffers and the read buffers, whereinthe control circuit is configured to allocate and deallocate theplurality of snoop buffers and the read buffers; wherein the pluralityof snoop buffers numbers at least one more than the read buffers. 14.The processor as recited in claim 13 wherein each of the plurality ofsnoop buffers is further configured to store a snoop from theinterconnect during use.
 15. The processor as recited in claim 13wherein if the first probe hits a first read transaction in one of theread buffers and the first read transaction has been initiated on theinterconnect but has not had a data transfer on the interconnect, theprocessor is configured to use a cache block received in response to thefirst read transaction at least once and then provide the cache block inresponse to the first probe.
 16. A memory bridge comprising: one or morecoherent read buffers, wherein each of the coherent read buffers isconfigured to store a coherent read coherency command for transmissionout of a node including the memory bridge; a plurality of acknowledgebuffers, wherein each of the plurality of acknowledge buffers isconfigured to store an acknowledge coherency command or a writebackcoherency command for transmission out of the node, at least some of thewriteback coherency commands in the plurality of acknowledge buffershaving a dependency on one of the coherent read commands, and at leastsome of the dependencies causing a second dependency on a command in oneof the plurality of acknowledge buffers; a control circuit coupled tothe coherent read buffers and the plurality of acknowledge buffers,wherein the control circuit is configured to control allocation anddeallocation of the coherent read buffers and the plurality ofacknowledge buffers; wherein the plurality of acknowledge buffersnumbers at least one more than the coherent read buffers.
 17. The memorybridge as recited in claim 16, wherein the memory bridge is configuredto insert coherent read coherency commands in the plurality of coherentread buffers in response to remote read transactions on an interconnectwithin the node to which the memory bridge is coupled.
 18. A methodcomprising: merging a first virtual channel to which first operationsbelong with a second virtual channel to which second operations belongto create a merged virtual channel, wherein at least some of the firstoperations have a dependency on one or more of the second operationsduring use, wherein a number of the first operations having thedependency is less than or equal to a maximum number of operations to bein execution, and wherein it is ambiguous whether a received operationin the merged virtual is one of the first operations or the secondoperations; and providing a number of buffers for the merged virtualchannel, the number of buffers exceeding a number corresponding to themaximum number of operations.
 19. The method as recited in claim 18,wherein at least some of the dependencies of the first operations on thesecond operations are false dependencies.